Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Sep 29, 2025

Description

Fixed incorrect model ID format for Claude Sonnet 4.5 in OpenRouter provider.

Changes

  • Changed anthropic/claude-4.5-sonnet to anthropic/claude-sonnet-4.5 to match the correct naming convention where the version number comes after 'sonnet'
  • Updated in:
    • packages/types/src/providers/openrouter.ts (3 occurrences in OPEN_ROUTER_PROMPT_CACHING_MODELS, OPEN_ROUTER_COMPUTER_USE_MODELS, and OPEN_ROUTER_REASONING_BUDGET_MODELS)
    • src/api/providers/fetchers/__tests__/openrouter.spec.ts (4 occurrences in test exclusion lists)

Testing

  • All tests pass successfully
  • Model ID now follows the same pattern as other Claude models (e.g., anthropic/claude-sonnet-4, anthropic/claude-3.5-sonnet)

Note

The model is currently excluded from OpenRouter API tests as it's not yet available in their API, but the correct format is now in place for when it becomes available.


Important

Corrects Claude Sonnet 4.5 model ID format in openrouter.ts and openrouter.spec.ts to ensure consistency and future API compatibility.

  • Behavior:
    • Corrects model ID from anthropic/claude-4.5-sonnet to anthropic/claude-sonnet-4.5.
    • Updated in openrouter.ts for OPEN_ROUTER_PROMPT_CACHING_MODELS, OPEN_ROUTER_COMPUTER_USE_MODELS, and OPEN_ROUTER_REASONING_BUDGET_MODELS.
    • Updated in openrouter.spec.ts for test exclusion lists.
  • Testing:
    • All tests pass successfully.
    • Model ID now follows the pattern of other Claude models (e.g., anthropic/claude-sonnet-4).
  • Note:
    • Model is excluded from OpenRouter API tests as it's not yet available, but the correct format is now in place.

This description was created by Ellipsis for b832e92. You can customize this summary. It will automatically update as commits are pushed.

Changed 'anthropic/claude-4.5-sonnet' to 'anthropic/claude-sonnet-4.5' to match the correct naming convention where the version number comes after 'sonnet'.

Updated in:
- packages/types/src/providers/openrouter.ts (3 occurrences)
- src/api/providers/fetchers/__tests__/openrouter.spec.ts (4 occurrences)
@mrubens mrubens merged commit 6759687 into main Sep 29, 2025
14 checks passed
@mrubens mrubens deleted the fix/claude-sonnet-4.5-model-id branch September 29, 2025 18:47
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Sep 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 29, 2025
Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some small improvements worth considering. Inline comments summarize minor suggestions.

"anthropic/claude-3.7-sonnet:thinking",
"anthropic/claude-sonnet-4",
"anthropic/claude-4.5-sonnet",
"anthropic/claude-sonnet-4.5",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] The corrected ID matches OpenRouter’s Anthropic naming convention. Consider adding a brief comment above these sets to document the expected pattern (e.g., anthropic/claude-sonnet-4.x) to prevent regressions.

"google/gemini-2.5-flash-lite-preview-06-17", // OpenRouter doesn't report this as supporting prompt caching
"anthropic/claude-opus-4.1", // Not yet available in OpenRouter API
"anthropic/claude-4.5-sonnet", // Not yet available in OpenRouter API
"anthropic/claude-sonnet-4.5", // Not yet available in OpenRouter API
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] This model ID is excluded in several places below as well. To avoid drift, consider extracting shared exclusions (like anthropic/claude-sonnet-4.5 while unavailable) into a single constant used across these sections.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. lgtm This PR has been approved by a maintainer bug Something isn't working labels Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants